module.exports = function main(miles,waittime) {
    if(miles<2)
    {
        total=6+0.25*waittime;
        
    }
    if(miles >= 2 && miles <= 8)
    {
        total = parseInt(0.8*miles+0.25*waittime);
        
    }
    if(miles > 8)
    {
        total = parseInt(0.8*miles+(miles-8)*0.4+0.25*waittime);
        
    }




    return total;
};